{
    _CP_.OPTIONS_HANDLER
        .set('value', {
            [Etype.string]: U.F.fn.obj,
            [Etype.boolean]: U.F.fn.obj,
            [Etype.number]: U.F.fn.obj,
            [Etype.null]: U.F.fn.obj,
        });
}

/**
 * 值控件注解
 * @param target 目标类型
 */
function ACvalue(target: any) {
    if (!U.isSubClass(_CVP_, target)) { return; }

    // 处理器
    const original_options_handlers = target.prototype.options_handlers;
    target.prototype.options_handlers = function (this: _CVP_<any>) {
        const options_handlers = original_options_handlers.call(this);

        U.O.setDefaultValue(options_handlers, 'value', _CP_.OPTIONS_HANDLER.get('value'));

        return options_handlers;
    };

    // 重载配置
    const original_overloading_mapping = target.prototype.overloading_mapping;
    target.prototype.overloading_mapping = function (this: _CVP_<any>, mapping: Toption_key_to_types_mapping<Toptions_VALUE>) {
        const overloading_mapping = original_overloading_mapping.call(this, mapping);

        overloading_mapping.push([
            { key: 'value', types: mapping.get('value') as Array<string> },
        ]);

        return overloading_mapping;
    };

    // 校验
    const original_options_checker = target.prototype.options_checker;
    target.prototype.options_checker = function (this: _CVP_<any>, options: Toptions_VALUE) {
        original_options_checker.call(this, options);

        U.O.setDefaultValue(options, 'value', DEFAULT);
    };

    // 初始化
    const original_initializer = target.prototype.initializer;
    target.prototype.initializer = function (this: _CVP_<any>) {
        original_initializer.call(this);

        this.item = this.item_render(this.options.value);

        this.setValue(this.options.value);
    };
}
